package com.yi.serviceorder.remote;

import com.yi.internalcommon.dto.PriceRule;
import com.yi.internalcommon.dto.ResponseResult;
import com.yi.internalcommon.request.ForecastPriceDTO;
import com.yi.internalcommon.request.PriceRuleIsNewRequest;
import com.yi.internalcommon.responese.ForecastPriceResponse;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient("service-price")
public interface ServicePriceClient {
    /**
     * 判断当前计价规则是否为最新
     * GET /price-rule/is-new
     * 接口ID：58608487
     * 接口地址：https://www.apifox.cn/link/project/1283880/apis/api-58608487
     */
    @PostMapping("/price-rule/is-new")
    ResponseResult<Boolean> isNew(@RequestBody PriceRuleIsNewRequest priceRuleIsNewRequest);

    @PostMapping("/price-rule/if-exists")
    ResponseResult<Boolean> ifExists(@RequestBody PriceRule priceRule);

    @PostMapping("/calculate-price")
    public ResponseResult<Double> calculatePrice(@RequestParam("distance") Integer distance, @RequestParam("duration") Integer duration, @RequestParam("cityCode") String cityCode, @RequestParam("vehicleType") String vehicleType);

    }
